package com.huakang.service.impl;

import com.huakang.entity.Record;
import com.huakang.mapper.RecordMapper;
import com.huakang.service.RecordService;
import com.huakang.utils.RecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RecordServiceImpl implements RecordService {
@Autowired
    RecordMapper recordMapper;

    @Override
    public List<RecordVo> findPid(Integer pid) {
        return recordMapper.select(pid);
    }

    @Override
    public boolean insert(Record record) {
        return recordMapper.insertSelective(record)>0?true:false;
    }
}
